function GtrPurchase(prefix, tableRow, item) {
  this._prefix = prefix;
  this._tableRow = tableRow;
  this._item = item;
  
  this._createElements();
};

GtrPurchase.prototype._createElements = function() {
  var td;
  
  td = this._tableRow.insertCell(-1);
  td.align = 'left';
  td.style.height = '30px';
  td.style.backgroundImage = (this._tableRow.rowIndex % 2 == 0) ? 'url(images/pageasst/common/whiteleft.png)' : 'url(images/pageasst/common/blackleft.png)';
  
  td = this._tableRow.insertCell(-1);
  td.align = 'left';
  td.style.height = '30px';
  td.style.backgroundImage = (this._tableRow.rowIndex % 2 == 0) ? 'url(images/pageasst/common/whitemiddle.png)' : 'url(images/pageasst/common/blackmiddle.png)';
  td.id = 'td' + this._prefix + this._tableRow.rowIndex + '1';
  td.appendChild(document.createTextNode(this._item.product.name));
  
  td = this._tableRow.insertCell(-1);
  td.align = 'left';
  td.style.backgroundImage = (this._tableRow.rowIndex % 2 == 0) ? 'url(images/pageasst/common/whitemiddle.png)' : 'url(images/pageasst/common/blackmiddle.png)';
  td.id = 'td' + this._prefix + this._tableRow.rowIndex + '2';
  td.appendChild(document.createTextNode(this._item.quantity));
  
  td = this._tableRow.insertCell(-1);
  td.align = 'left';
  td.style.backgroundImage = (this._tableRow.rowIndex % 2 == 0) ? 'url(images/pageasst/common/whitemiddle.png)' : 'url(images/pageasst/common/blackmiddle.png)';
  td.id = 'td' + this._prefix + this._tableRow.rowIndex + '3';
  if (this._item.packageType != '') {
    td.appendChild(document.createTextNode(this._item.packageType));
  } else {
    td.appendChild(document.createTextNode(this._item.price));
  }
  
  td = this._tableRow.insertCell(-1);
  td.align = 'center';
  td.style.backgroundImage = (this._tableRow.rowIndex % 2 == 0) ? 'url(images/pageasst/common/whiteright.png)' : 'url(images/pageasst/common/blackright.png)';
  var del = document.createElement('img');
  del.src = 'images/pageasst/pagecustomer/delete.png';
  del.style.cursor = 'pointer';
  del.id = 'button' + this._prefix + this._tableRow.rowIndex + '1';
  td.appendChild(del);

};